public class work3 {
    //在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
    public static int max2(int num1,int num2) {
        int max2 = 0;
        if(num1 > num2){
            max2 = num1;
        }else{
            max2 = num2;
        }
        return max2;
    }
    public static double max3(double num1,double num2,double num3) {

        double max = 0;
        if (num1 > num2){
            max = num1;
        }if (num2 > num1) {
            max = num2;
        }
            if(max < num3){
                max = num3;
                return max;
            }else {
                return max;
            }
        }

    public static void main(String[] args) {
        int num1 = 5;
        int num2 = 3;
        double con1 = 2.5;
        double con2 = 3.5;
        double con3  = 1.5;
        int max1 = max2(num1,num2);
        double Max = max3(con1,con2,con3);
        System.out.println(max1);
        System.out.println(Max);
    }
    }
